<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>宝贝详情获取</title>
    <meta name="keywords" content="宝贝复制,淘宝详情">
    <meta name="description" content="">
    <link rel="stylesheet" href="./src/style/pure-min.css">
    <link rel="stylesheet" href="./src/style/main.css">
</head>
<body>
    <div>
        <div class="header">
            <div class="header-content">
                <img class="header-icon" src="./images/icon.svg" alt="">
                <span class="header-title">宝贝详情获取</span>
                <!-- <button class="pure-button pure-button-primary" id="test">测试</button> -->
            </div>
            <!-- <a href="./" class="download-link">
                <img class="icon-download" src="./images/download.svg" alt="">
                <div>插件下载</div>
            </a> -->
        </div>
        <div class="content pure-g">
            <div class="pure-u-4-5">
                <div class="pure-form">
                    <div>
                        <span>
                            导出形式:
                        </span>
                        <label>
                            <input name="exportType" value="file" type="radio">
                            文件
                        </label>
                        <label>
                            <input name="exportType" value="zip" type="radio">
                            zip
                        </label>
                        <!-- &emsp;
                        <span>请求方式:</span>
                        <label>
                            <input name="requestType" value="request" type="radio">
                            request
                        </label>
                        <label>
                            <input name="requestType" value="iframe" type="radio">
                            iframe
                        </label> -->
                    </div>
                    <div class="tab-bar" style="display:none;">
                        <div class="tab-bar-active">
                            淘宝/天猫
                        </div>
                        <div>
                            拼多多
                        </div>

                    </div>
                    <!-- 淘宝/天猫 -->
                    <div class="tab-content tab-content-1">
                        <textarea
                            name=""
                            id="copy-url"
                            cols="30"
                            rows="20"
                            placeholder="输入淘宝、天猫的宝贝地址，支持批量复制，批量复制时一行一个宝贝链接 (如 https://item.taobao.com/item.htm?id=123456789)"
                        ></textarea>
                        <p>
                            <button class="pure-button pure-button-primary" id="copy-start">开始获取</button>
                        </p>
                    </div>
                    <!-- 拼多多 -->
                    <div class="tab-content tab-content-2 hide">
                        <textarea
                            name=""
                            id="copy-url-pdd"
                            cols="30"
                            rows="20"
                            placeholder="输入拼多多的宝贝地址，支持批量复制，批量复制时一行一个宝贝链接 (如 https://mobile.yangkeduo.com/goods.html?goods_id=136190829288)"
                        ></textarea>
                        <p>
                            <button class="pure-button pure-button-primary" id="copy-start-pdd">开始获取</button>
                        </p>
                    </div>
                </div>
            </div>
            <div class="pure-u-1-5">
                <div>
                    <div class="save-path-text">
                        无保存路径
                    </div>
                    <button class="set-save-path pure-button pure-button-primary" style="margin-top: 10px;margin-bottom: 10px;">
                        设置保存路径
                    </button>
                </div>
                <!-- 教程 -->
                <!-- <div class="tutorial-block">
                    <img src="./images/tutorial.svg" alt="">
                    查看操作教程
                </div> -->
                <div id="progress-bar-block">
                    进度(<span id="progress-description">  </span>) <span id="progress-c">0</span> / <span id="progress-t">0</span>
                    <div id='progress-bar-wrap'>
                        <div id="progress-bar"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div id="side-bar">
        <div class="side-w wx-wrap" title="刷新">
            <img class="icon icon-refresh" src="./src/refresh.svg" alt="">
        </div>
        <!-- <div class="side-w wx-wrap">
            <img class="icon icon-wx" src="./images/wx.svg" alt="">
        </div>
        <div class="side-w wx-wrap">
            <img class="icon icon-more" src="./images/more.svg" alt="">
        </div> -->

    </div>
    <div id="webview-host" style="width: 400px;height: 400px;position: fixed;left:-1000px;bottom: 0;border:1px solid red;">
        <!-- <iframe id="test-iframe" src="https://item.taobao.com/item.htm?spm=a230r.1.14.245.125e66c6T7w42K&id=616268726828&ns=1&abbucket=4#detail" frameborder="0"></iframe> -->
    </div>
    <script>
        let { desktopCapturer, ipcRenderer, remote, webFrame, clipboard, shell} = require('electron');
        window.desktopCapturer = desktopCapturer;
        window.ipcRenderer = ipcRenderer;
        window.remote = remote;
        window.webFrame = webFrame;
        window.clipboard = clipboard;
        window.child_process = require('child_process');
        window.exec = window.child_process.exec;
        window.shell = shell;

        // window.glob = require('glob');
        window.path = require('path');
        window.fs = require('fs');
        window.http = require('http');
        window.request = require('request');
        // 当前目录
        window.dirname = __dirname;

        console.log('666666',__dirname);

        /* return; */
        /* setTimeout(()=>{
            let url = 'https://detail.tmall.com/item.htm?spm=a230r.1.14.6.6ec0272dRWepAl&id=616429353822&cm_id=140105335569ed55e27b&abbucket=5';
            requestData = {};
            request({
                url: url,
                method: "GET",
                json: true,
                headers: {
                    "content-type": "application/json",
                },
                body: JSON.stringify(requestData)
            }, function(error, response, body) {
                if (!error && response.statusCode == 200) {
                    console.log(body) // 请求成功的处理逻辑
                }
            });

        }, 3000) */

        /* setTimeout(()=>{
            // 打开新窗口
            // window.open('https://github.com', '_blank', 'top=500,left=200,frame=false,nodeIntegration=no')
            let res = remote.dialog.showOpenDialog({ title: '请选择保存位置',properties: ['openDirectory'] }, function(res){
                //回调函数内容，此处是将路径内容显示在input框内
                downloadFolder.value = res[0];
            });
            console.log(res);
        }, 2000) */

    </script>
    <!--<script src="./src/xlsx.core.min.js"></script>-->
    <script src="./src/jquery.min.js"></script>
    <script>
        if (typeof module === 'object') {
            window.jQuery = window.$ = module.exports;
        };
    </script>
    <script src="./src/jszip.js"></script>
    <script src="src/main.bulid.js"></script>
    <!-- <script src="./src/main.js"></script>
    <script src="./src/goodsCopy.series.js"></script> -->
</body>
</html>